﻿@using Smartstore.Core;

@{
    // Page title
    string adminPageTitle = string.Empty;
    if (!string.IsNullOrWhiteSpace(ViewBag.Title))
    {
        adminPageTitle = ViewBag.Title + " / ";
    }
    adminPageTitle += T("Admin.PageTitle").Value;
}
<!DOCTYPE html>
<html sm-language-attributes-for="WorkContext.WorkingLanguage" class="no-js not-ready loading" data-pnotify-firstpos1="0">
<head>
    <title>@adminPageTitle</title>
    <meta charset="utf-8" />
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover, shrink-to-fit=no" />
    <meta name="HandheldFriendly" content="true">
    <meta property="sm:root" content="@Url.Content("~/")" />
    @await Component.InvokeAsync("AntiForgeryToken") 

    <partial name="ConditionalComments" />
    <partial name="_ClientRes" />

    <zone name="stylesheets">
        <link rel="stylesheet" href="~/bundle/css/admin-common.css" />
        <link rel="stylesheet" href="~/bundle/css/admin-theme.css" />
        @if (WorkContext.WorkingLanguage.Rtl)
        {
            <link rel="stylesheet" href="~/bundle/css/admin-theme-rtl.css" />
        }
    </zone>

    <zone name="head_scripts">
        <script src="~/bundle/js/jquery.js"></script>
        <script src="~/bundle/js/vue.js"></script>
    </zone>

    <link rel="shortcut icon" href="~/admin/favicon.ico?v=@SmartstoreVersion.CurrentVersion" />

    @* Preload web font files to avoid FOIT (Flash of Invisible Text) and FOUT (Flash of Unstyled Text) *@
    <link as="font" rel="preload" href="~/lib/fontastic/fonts/fontastic.woff" crossorigin />
    <link as="font" rel="preload" href="~/lib/fa6/webfonts/fa-solid-900.woff2" crossorigin />
    <link as="font" rel="preload" href="~/lib/fa6/webfonts/fa-regular-400.woff2" crossorigin />

    <zone name="head_links"></zone>
    <zone name="head"></zone>

    <script src="~/js/smartstore.globalization.adapter.js"></script>
</head>

<body>
    <zone name="start" />
    @RenderBody()
    <zone name="aftercontent" />

    <zone name="scripts">
        <script src="~/bundle/js/admin.js"></script>
        <script src="~/bundle/js/datagrid.js"></script>
        <script src="~/lib/select2/js/i18n/{lang}.js" sm-locale-for="WorkContext.WorkingLanguage"></script>
        <script src="~/lib/moment/locale/{lang}.js" sm-locale-for="WorkContext.WorkingLanguage"></script>
    </zone>
    
    <zone name="end" />
</body>
</html>
